﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication10.App_Code;
using System.Web.Security;


namespace WebApplication10
{
    public partial class LoginPageEmployer : System.Web.UI.Page
    {
       
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            Employer em = Employer.GetEmployerByUsername(LoginEmpUsername.Text);

            if (em.Password == LoginEmpPassword.Text)

            {
                FormsAuthentication.RedirectFromLoginPage(LoginEmpUsername.Text, false);
            }
                  
            Response.Redirect("~/MasterEmployerUI.aspx");
        }


        protected void Button2_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/HomePage.aspx");
        }
    }
}